﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class controls_DisplayMessage : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    private String imagePath;

    public String ImagePath
    {
        get { return imagePath; }
        set { imagePath = value; Icon.ImageUrl = imagePath; }
    }

    private String msg;

    public String Msg
    {
        get { return msg; }
        set 
        { 
            msg = value; 
            Message.Text = msg;
            MessagePanel.Visible = true;
            MessageTimer.Enabled = true;
        }
    }

    protected void MessageTimer_Tick(object sender, EventArgs e)
    {
        MessagePanel.Visible = false;

    }

    private String successMessage;

    public String SuccessMessage
    {
        get { return successMessage; }
        set { successMessage = value; Msg = value; Icon.ImageUrl = "~/images/tick.png"; }
    }

    private String failureMessage;

    public String FailureMessage
    {
        get { return failureMessage; }
        set { failureMessage = value; Msg = value; Icon.ImageUrl = "~/images/cross.png"; }
    }
        

}
